package com.microbroadcast.resource;

import java.util.Date;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/*
 * resource class of Comment
 * 
 * Written by pansen at 2013/04/17
 * 
 */
@XmlRootElement(name="Comment")
public class Comment {
	/*
	 * ID of comment
	 */
	private long commentID;
	/*
	 * content of comment
	 */
	private String text;
	/*
	 * creatTime
	 */
	private Date createAt;

	/*
	 * the message of the comment belong to
	 */
	private Message message;
	/*
	 * user that create comment
	 */
	private UserBasic user;
	/*
	 * the comment reply to which comment
	 */
	private long replyCommentID;

	public Comment(){}
	public Comment(long commentID, String text, Date createAt, Message message,
			UserBasic user, long replyCommentID) {
		this.commentID = commentID;
		this.text = text;
		this.createAt = createAt;
		this.message = message;
		this.user = user;
		this.replyCommentID = replyCommentID;
	}

	@XmlElement(name="CommentID")
	public long getCommentID() {
		return commentID;
	}

	public void setCommentID(long commentID) {
		this.commentID = commentID;
	}

	@XmlElement(name="Text")
	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	@XmlElement(name="CreateAt")
	public Date getCreateAt() {
		return createAt;
	}

	public void setCreateAt(Date createAt) {
		this.createAt = createAt;
	}

	@XmlElement(name="Message")
	public Message getMessage() {
		return message;
	}

	public void setMessage(Message message) {
		this.message = message;
	}

	@XmlElement(name="UserBasic")
	public UserBasic getUser() {
		return user;
	}

	public void setUser(UserBasic user) {
		this.user = user;
	}

	@XmlElement(name="ReplyCommentID")
	public long getReplyCommentID() {
		return replyCommentID;
	}

	public void setReplyCommentID(long replyCommentID) {
		this.replyCommentID = replyCommentID;
	}
	

}
